﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Connection.Presenter
{
    [Serializable()]
    public class SignUpPresenter : MarshalByRefObject
    {
        UserDB _userDB = new UserDB();
        FindUnicodeLetter _findUniLetter = new FindUnicodeLetter();
        public bool IsUnicodeUsername(string Username)
        {
            return _findUniLetter.FindUnicode(Username) ? true : false;
        }
        public bool IsRightUsername(string Username)
        {
            return _userDB.SelectUserId(Username) != null ? false : true;
        }

        public int InsertNewUser(string Username, string Password)
        {
            return _userDB.InsertUser(Username, Password);
        }
    }
}
